package com.yuma.springaitool.service;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ToolService {

    @Autowired
    StudentService studentService;
    // 告诉大模型提供的工具
    @Tool(description = "报名")
    public String signUp(@ToolParam(description = "姓名", required = true)String name,
                         @ToolParam(description = "技术方向") String direction){
        studentService.add(name, direction);
        return "报名成功";
    }
}
